
package jtrimet;

import java.math.*;
import java.util.*;

/**
 * 
 * TriMet location.
 * 
 * This is typically a "bus stop"
 * 
 * 
 */
public class Location
{
	private String description;
	private String direction;
	private BigDecimal latitude;
	private BigDecimal longitude;
	private String locationId;
	private List<Arrival> arrivals = new ArrayList<Arrival>();
	
	public Location()
	{
		super();
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String desc)
	{
		this.description = desc;
	}

	public String getDirection()
	{
		return direction;
	}

	public void setDirection(String dir)
	{
		this.direction = dir;
	}

	public BigDecimal getLatitude()
	{
		return latitude;
	}

	public void setLatitude(String lat)
	{
		this.latitude = new BigDecimal(lat);
	}

	public BigDecimal getLongitude()
	{
		return longitude;
	}

	public void setLongitude(String lng)
	{
		this.longitude = new BigDecimal(lng);
	}

	public String getLocationId()
	{
		return locationId;
	}

	public void setLocationId(String id)
	{
		this.locationId = id;
	}

	public void addArrival(Arrival a)
	{
		if (arrivals == null)
		{
			arrivals = new ArrayList<Arrival>();
		}
		this.arrivals.add(a);
	}
	
	public List<Arrival> getArrivals()
	{
		if (arrivals == null)
		{
			arrivals = new ArrayList<Arrival>();
		}
		return arrivals;
	}

	public void setArrivals(List<Arrival> a)
	{
		this.arrivals = a;
	}
	

	
}
